//
//  AppDelegate_Pad.m
//  WebPDA
//
//  Created by Justin Yip on 10-7-21.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import "AppDelegate_Pad.h"

@implementation AppDelegate_Pad
@synthesize splitViewController;

#pragma mark -
#pragma mark Application delegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
	
	UITabBarItem *tabBarItem = [[UITabBarItem alloc] initWithTitle:@"旅客信息" image:[UIImage imageNamed:@"112-group.png"] tag:1];
	splitViewController.tabBarItem = tabBarItem;
	[tabBarItem release];
	
	NSArray *array = tabBarController.viewControllers;
	NSMutableArray *tmpArray = [[NSMutableArray alloc] initWithArray:array];
	[tmpArray removeObjectAtIndex:0];
	[tmpArray insertObject:splitViewController atIndex:0];
	tabBarController.viewControllers = tmpArray;
	[tmpArray release];
	
	return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

/**
 Superclass implementation saves changes in the application's managed object context before the application terminates.
 */
- (void)applicationWillTerminate:(UIApplication *)application {
	[super applicationWillTerminate:application];
}


#pragma mark -
#pragma mark Memory management

- (void)dealloc {
	[splitViewController release];
	[super dealloc];
}


@end

